
public class SalariedEmployee extends Employee
{
	private double weeklySalary;

	public SalariedEmployee(String first, String last, String ssn, double salaryofWeek)
	{
		super(first,last,ssn);
		setweeklySalary(salaryofWeek);
	}
	
	public void setweeklySalary(double a)
	{
		weeklySalary = (a<0.0)? 0.0 : a;
	}
	
	public double getweeklySalary()
	{
		return weeklySalary;
	}
	
	@Override
	public double earnings()
	{
		return getweeklySalary();
	}

	
	@Override
	public String toString()
	{
		String temp = "First Name: " + getfirstName() + "\n" + 
						"Last Name: " +  getlastName() + "\n" +
						 "SSN: " + getSsn() + "\n" +
						 "Weekly Salary: " + getweeklySalary() + "\n" +
						 "Salary: " + earnings() + "\n";
						
		return temp;
	}
	
	

}
